export const columns1 = [
    {
        key: 'ID',
        title: '设备ID'
    },
    {
        key: 'distance',
        title: '距离',
        sortable: true,
    },
    {
        key: 'availability',
        title: '空闲率',
        sortable: true,
    }
];

export const columns2 = [
    {
        key: 'recordID',
        title: '计费ID',
        width: 100,
    },
    {
        key: 'ID',
        title: '设备ID',
        width: 100,
    },
    {
        key: 'type',
        title: '设备类型',
    },
    {
        key: 'startTime',
        title: '启动于',
        width: 100,
        sortable: true,
    },
    {
        key: 'endTime',
        title: '结束于',
        width: 100,
        sortable: true,
    },
    {
        key: 'runTime',
        title: '计费时长',
        sortable: true,
        render: (h, params) => {
            return h('span', [params.row.runTime, ' 小时']);
        }
    },
    {
        key: 'cost',
        title: '计费单价',
        sortable: true,
        render: (h, params) => {
            return h('span', ['￥', params.row.cost, '/小时']);
        }
    },
    {
        key: 'totalCost',
        title: '总计费用',
        sortable: true,
        render: (h, params) => {
            return h('span', ['￥', params.row.runTime]);
        }
    },
    {
        key: 'status',
        title: '设备当前状态',
        width: 130,
        render: (h, params) => {
            return h('Tag', {
                props: {
                    type: 'dot',
                    color: params.row.status === 'inUse' ? 'green' : 'red',
                }
            }, params.row.status === 'inUse' ? '使用中' : '报警');
        }
    }
];

export const searchTable1 = [
    {
        ID: 'D9831812',
        distance: '15m',
        availability: '78%'
    },
    {
        ID: 'D9831813',
        distance: '415m',
        availability: '98%'
    },
    {
        ID: 'D9831813',
        distance: '71m',
        availability: '58%'
    },
    {
        ID: 'D9831814',
        distance: '911m',
        availability: '18%'
    }
];

export const searchTable2 = [
    {
        recordID: 'R37129121',
        ID: 'D9831812',
        type: '人工肺',
        startTime: '2018-01-11 08:31:41',
        endTime: '2018-01-11 14:51:18',
        runTime: '6.35',
        cost: '1300',
        totalCost: '8255',
        status: 'inUse',
    },
    {
        recordID: 'R37129123',
        ID: 'D9831813',
        type: '人工肺',
        startTime: '2018-01-11 08:22:41',
        endTime: '2018-02-11 14:55:40',
        runTime: '713.51',
        cost: '1300',
        totalCost: '927563',
        status: 'inUse',
    },
    {
        recordID: 'R37129194',
        ID: 'D9831821',
        type: '人工肺',
        startTime: '2018-02-13 12:31:41',
        endTime: '2018-02-14 03:19:06',
        runTime: '16.35',
        cost: '1300',
        totalCost: '21255',
        status: 'danger',
    },
];

export const searchTable3 = [
    {
        ID: 'D9831812',
        distance: '15m',
        availability: '78%'
    },
    {
        ID: 'D9831813',
        distance: '415m',
        availability: '98%'
    },
    {
        ID: 'D9831813',
        distance: '71m',
        availability: '58%'
    },
    {
        ID: 'D9831814',
        distance: '911m',
        availability: '18%'
    }
];
